package com.hq.bootdemo.controller;

import com.hq.bootdemo.service.RoomService;
import com.hq.bootdemo.util.JSONutil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/room")
public class RoomController {
    @Resource
    RoomService roomService;
    @GetMapping("/selectAll")
    public String selectAll(){
        return JSONutil.getJson(roomService.selectAll());
    }
}
